home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3 / Xi / XSetDeviceFocus.z / XSetDeviceFocus
Encoding:
Text File  |  1998-10-30  |  10.1 KB  |  199 lines

  1.  
  2.  
  3.  
  4.      XXXXSSSSeeeettttDDDDeeeevvvviiiicccceeeeFFFFooooccccuuuussss((((3333XXXX11111111))))XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....3333))))XXXXSSSSeeeettttDDDDeeeevvvviiiicccceeeeFFFFooooccccuuuussss((((3333XXXX11111111))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.           XSetDeviceFocus, XGetDeviceFocus - control extension input
  10.           device focus
  11.  
  12.      SSSSYYYYNNNNTTTTAAAAXXXX
  13.           XSetDeviceFocus(_d_i_s_p_l_a_y, _d_e_v_i_c_e, _f_o_c_u_s, _r_e_v_e_r_t__t_o, _t_i_m_e)
  14.                 Display *_d_i_s_p_l_a_y;
  15.                 Display *_d_e_v_i_c_e;
  16.                 Window _f_o_c_u_s;
  17.                 int _r_e_v_e_r_t__t_o;
  18.                 Time _t_i_m_e;
  19.  
  20.           XGetDeviceFocus(_d_i_s_p_l_a_y, _d_e_v_i_c_e, _f_o_c_u_s__r_e_t_u_r_n,
  21.           _r_e_v_e_r_t__t_o__r_e_t_u_r_n, _t_i_m_e__r_e_t_u_r_n)
  22.                 Display *_d_i_s_p_l_a_y;
  23.                 Display *_d_e_v_i_c_e;
  24.                 Window *_f_o_c_u_s__r_e_t_u_r_n;
  25.                 int *_r_e_v_e_r_t__t_o__r_e_t_u_r_n;
  26.                 int *_t_i_m_e__r_e_t_u_r_n;
  27.  
  28.      AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
  29.           _d_i_s_p_l_a_y     Specifies the connection to the X server.
  30.  
  31.           _d_e_v_i_c_e      Specifies the device whose focus is to be
  32.                       queried or changed.
  33.  
  34.           _f_o_c_u_s       Specifies the window, _P_o_i_n_t_e_r_R_o_o_t,
  35.                       _F_o_l_l_o_w_K_e_y_b_o_a_r_d, or _N_o_n_e.
  36.  
  37.           _f_o_c_u_s__r_e_t_u_r_n
  38.                       Returns the focus window, _P_o_i_n_t_e_r_R_o_o_t,
  39.                       _F_o_l_l_o_w_K_e_y_b_o_a_r_d, or _N_o_n_e.
  40.  
  41.           _r_e_v_e_r_t__t_o   Specifies where the input focus reverts to if
  42.                       the window becomes not viewable.  You can pass
  43.                       _R_e_v_e_r_t_T_o_P_a_r_e_n_t, _R_e_v_e_r_t_T_o_P_o_i_n_t_e_r_R_o_o_t,
  44.                       _R_e_v_e_r_t_T_o_F_o_l_l_o_w_K_e_y_b_o_a_r_d, or _R_e_v_e_r_t_T_o_N_o_n_e.
  45.  
  46.           _r_e_v_e_r_t__t_o__r_e_t_u_r_n
  47.                       Returns the current focus state _R_e_v_e_r_t_T_o_P_a_r_e_n_t,
  48.                       _R_e_v_e_r_t_T_o_P_o_i_n_t_e_r_R_o_o_t, _R_e_v_e_r_t_T_o_F_o_l_l_o_w_K_e_y_b_o_a_r_d, or
  49.                       _R_e_v_e_r_t_T_o_N_o_n_e.
  50.  
  51.           _t_i_m_e__r_e_t_u_r_n Returns the last_focus_time for the device.
  52.  
  53.           _t_i_m_e        Specifies the time.  You can pass either a
  54.                       timestamp or _C_u_r_r_e_n_t_T_i_m_e.
  55.  
  56.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  57.           The _X_S_e_t_D_e_v_i_c_e_F_o_c_u_s request changes the focus of the
  58.           specified device and its last-focus-change time.  It has no
  59.           effect if the specified time is earlier than the current
  60.  
  61.  
  62.  
  63.      Page 1                                          (printed 4/30/98)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      XXXXSSSSeeeettttDDDDeeeevvvviiiicccceeeeFFFFooooccccuuuussss((((3333XXXX11111111))))XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....3333))))XXXXSSSSeeeettttDDDDeeeevvvviiiicccceeeeFFFFooooccccuuuussss((((3333XXXX11111111))))
  71.  
  72.  
  73.  
  74.           last-focus-change time or is later than the current X server
  75.           time.  Otherwise, the last-focus-change time is set to the
  76.           specified time _C_u_r_r_e_n_t_T_i_m_e is replaced by the current X
  77.           server time).  _X_S_e_t_D_e_v_i_c_e_F_o_c_u_s causes the X server to
  78.           generate _D_e_v_i_c_e_F_o_c_u_s_I_n and _D_e_v_i_c_e_F_o_c_u_s_O_u_t events.
  79.  
  80.           Depending on the focus argument, the following occurs:
  81.  
  82.           +o    If focus is _N_o_n_e , all device events are discarded
  83.                until a new focus window is set, and the revert_to
  84.                argument is ignored.
  85.  
  86.           +o    If focus is a window, it becomes the device's focus
  87.                window.  If a generated device event would normally be
  88.                reported to this window or one of its inferiors, the
  89.                event is reported as usual. Otherwise, the event is
  90.                reported relative to the focus window.
  91.  
  92.           +o    If focus is _P_o_i_n_t_e_r_R_o_o_t, the focus window is
  93.                dynamically taken to be the root window of whatever
  94.                screen the pointer is on at each event from the
  95.                specified device. In this case, the revert_to argument
  96.                is ignored.
  97.  
  98.           +o    If focus is _F_o_l_l_o_w_K_e_y_b_o_a_r_d, the focus window is
  99.                dynamically taken to be the window to which the X
  100.                keyboard focus is set at each input event.
  101.  
  102.           The specified focus window must be viewable at the time
  103.           _X_S_e_t_D_e_v_i_c_e_F_o_c_u_s is called, or a _B_a_d_M_a_t_c_h error results.  If
  104.           the focus window later becomes not viewable, the X server
  105.           evaluates the revert_to argument to determine the new focus
  106.           window as follows:
  107.  
  108.           +o    If revert_to is _R_e_v_e_r_t_T_o_P_a_r_e_n_t, the focus reverts to
  109.                the parent (or the closest viewable ancestor), and the
  110.                new revert_to value is taken to be _R_e_v_e_r_t_T_o_N_o_n_e.
  111.  
  112.           +o    If revert_to is _R_e_v_e_r_t_T_o_P_o_i_n_t_e_r_R_o_o_t,
  113.                _R_e_v_e_r_t_T_o_F_o_l_l_o_w_K_e_y_b_o_a_r_d, or _R_e_v_e_r_t_T_o_N_o_n_e, the focus
  114.                reverts to _P_o_i_n_t_e_r_R_o_o_t, _F_o_l_l_o_w_K_e_y_b_o_a_r_d, or _N_o_n_e,
  115.                respectively.
  116.  
  117.           When the focus reverts, the X server generates _D_e_v_i_c_e_F_o_c_u_s_I_n
  118.           and _D_e_v_i_c_e_F_o_c_u_s_O_u_t events, but the last-focus-change time is
  119.           not affected.
  120.  
  121.           Input extension devices are not required to support the
  122.           ability to be focused.  Attempting to set the focus of a
  123.           device that does not support this request will result in a
  124.           _B_a_d_M_a_t_c_h error.  Whether or not given device can support
  125.           this request can be determined by the information returned
  126.  
  127.  
  128.  
  129.      Page 2                                          (printed 4/30/98)
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.      XXXXSSSSeeeettttDDDDeeeevvvviiiicccceeeeFFFFooooccccuuuussss((((3333XXXX11111111))))XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....3333))))XXXXSSSSeeeettttDDDDeeeevvvviiiicccceeeeFFFFooooccccuuuussss((((3333XXXX11111111))))
  137.  
  138.  
  139.  
  140.           by _X_O_p_e_n_D_e_v_i_c_e.  For those devices that support focus,
  141.           _X_O_p_e_n_D_e_v_i_c_e will return an _X_I_n_p_u_t_C_l_a_s_s_I_n_f_o structure with
  142.           the input_class field equal to the constant _F_o_c_u_s_C_l_a_s_s
  143.           (defined in the file _X_I._h).
  144.  
  145.           _X_S_e_t_D_e_v_i_c_e_F_o_c_u_s can generate _B_a_d_D_e_v_i_c_e, _B_a_d_M_a_t_c_h, _B_a_d_V_a_l_u_e,
  146.           and _B_a_d_W_i_n_d_o_w errors.
  147.  
  148.           The _X_G_e_t_D_e_v_i_c_e_F_o_c_u_s request returns the focus window and the
  149.           current focus state.
  150.  
  151.           Not all input extension devices can be focused.  Attempting
  152.           to query the focus state of a device that can't be focused
  153.           results in a _B_a_d_M_a_t_c_h error.  A device that can be focused
  154.           returns information for input Class Focus when an
  155.           _X_O_p_e_n_D_e_v_i_c_e request is made.
  156.  
  157.           _X_G_e_t_D_e_v_i_c_e_F_o_c_u_s can generate _B_a_d_D_e_v_i_c_e, and _B_a_d_M_a_t_c_h errors.
  158.  
  159.      DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  160.           _B_a_d_D_e_v_i_c_e   An invalid device was specified.  The specified
  161.                       device does not exist or has not been opened by
  162.                       this client via _X_O_p_e_n_I_n_p_u_t_D_e_v_i_c_e.  This error
  163.                       may also occur if the specified device is the X
  164.                       keyboard or X pointer device.
  165.  
  166.           _B_a_d_V_a_l_u_e    Some numeric value falls outside the range of
  167.                       values accepted by the request.  Unless a
  168.                       specific range is specified for an argument, the
  169.                       full range defined by the argument's type is
  170.                       accepted.  Any argument defined as a set of
  171.                       alternatives can generate this error.
  172.  
  173.           _B_a_d_W_i_n_d_o_w   A value for a Window argument does not name a
  174.                       defined Window.
  175.  
  176.           _B_a_d_M_a_t_c_h    This error may occur if an _X_G_e_t_D_e_v_i_c_e_F_o_c_u_s or
  177.                       _X_S_e_t_D_e_v_i_c_e_F_o_c_u_s request was made specifying a
  178.                       device that the server implementation does not
  179.                       allow to be focused.
  180.  
  181.      SSSSEEEEEEEE AAAALLLLSSSSOOOO
  182.           _P_r_o_g_r_a_m_m_i_n_g _w_i_t_h _X_l_i_b
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.      Page 3                                          (printed 4/30/98)
  196.  
  197.  
  198.  
  199.